﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program 
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入需要计算图形：1.圆，2.长方形");
            int key = int.Parse(Console.ReadLine());
            area a = new area();
            switch (key)
            { case 1:
                    Console.WriteLine("请输入圆的半径");
                    double r = double.Parse(Console.ReadLine());
                    a.areas(r);
                    break;
                case 2:
                    Console.WriteLine("请输入长方形的长");
                   int c= int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入长方形的宽");
                    int k = int.Parse(Console.ReadLine());
                    a.areas(c, k);
                    break;
                default:
                    break;
            }
        }
       
    }
}
